package com.bvgol.examples.springboot.elk.controller;

import com.bvgol.examples.springboot.elk.service.SearchService;
import com.bvgol.examples.springboot.elk.vo.SearchParam;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: my-spring-completely
 * @description: elsticsearch 查询
 * @author: GUOCHEN
 * @create: 2021/04/06 15:10
 */
@RestController
@RequestMapping("/search")
@AllArgsConstructor
public class SearchController {
    private SearchService searchService;

    /**
     * @param
     * @return
     * @Classname SearchController
     * @Description TODO
     * @Date 2021/4/6 16:09
     * @auther by GUOCHEN
     */
    @GetMapping("findAll")
    public Object findAll(SearchParam param) {
        return searchService.findAll(param);
    }

}
